package com.seed.application.context.impl;

import com.seed.application.Sa;
import com.seed.application.context.SeedContext;
import com.seed.core.query.App;
import com.seed.core.query.Micro;

public class SeedContextImpl implements SeedContext {
    private final SeedContext seedContext;

    public SeedContextImpl() {
        this.seedContext = switch (Sa.getMode()) {
            case app -> new AppSeedContext();
            case micro -> new MicroSeedContext();
            case single -> new SingleSeedContext();
            case dev -> new DevSeedContext();
        };
    }

    @Override
    public App getApp() {
        return seedContext.getApp();
    }

    @Override
    public Micro getMicro() {
        return seedContext.getMicro();
    }
}
